package com.hand.zc25650.pojo;


import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

public class Item implements Serializable {

  private long itemId;
  private String itemCode;
  private String itemUom;
  private String itemDescription;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  private Date startActiveDate;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
  private Date endActiveDate;
  private byte enabledFlag;
  private long objectVersionNumber;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date creationDate;
  private long createdBy;
  private long lastUpdatedBy;
  @DateTimeFormat(pattern = "yyyy-MM-dd")
  @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
  private Date lastUpdateDate;


  public Item() {
  }

  public Item(String itemCode, String itemUom, String itemDescription, Date startActiveDate, Date endActiveDate, byte enabledFlag) {
    this.itemCode = itemCode;
    this.itemUom = itemUom;
    this.itemDescription = itemDescription;
    this.startActiveDate = startActiveDate;
    this.endActiveDate = endActiveDate;
    this.enabledFlag = enabledFlag;
  }

  public Item(long itemId, String itemCode, String itemUom, String itemDescription, Date startActiveDate, Date endActiveDate, byte enabledFlag) {
    this.itemId = itemId;
    this.itemCode = itemCode;
    this.itemUom = itemUom;
    this.itemDescription = itemDescription;
    this.startActiveDate = startActiveDate;
    this.endActiveDate = endActiveDate;
    this.enabledFlag = enabledFlag;
  }

  public Item(long itemId, String itemCode, String itemUom, String itemDescription, Date startActiveDate, Date endActiveDate, byte enabledFlag, long objectVersionNumber, Date creationDate, long createdBy, long lastUpdatedBy, Date lastUpdateDate) {
    this.itemId = itemId;
    this.itemCode = itemCode;
    this.itemUom = itemUom;
    this.itemDescription = itemDescription;
    this.startActiveDate = startActiveDate;
    this.endActiveDate = endActiveDate;
    this.enabledFlag = enabledFlag;
    this.objectVersionNumber = objectVersionNumber;
    this.creationDate = creationDate;
    this.createdBy = createdBy;
    this.lastUpdatedBy = lastUpdatedBy;
    this.lastUpdateDate = lastUpdateDate;
  }

  public long getItemId() {
    return itemId;
  }

  public void setItemId(long itemId) {
    this.itemId = itemId;
  }

  public String getItemCode() {
    return itemCode;
  }

  public void setItemCode(String itemCode) {
    this.itemCode = itemCode;
  }

  public String getItemUom() {
    return itemUom;
  }

  public void setItemUom(String itemUom) {
    this.itemUom = itemUom;
  }

  public String getItemDescription() {
    return itemDescription;
  }

  public void setItemDescription(String itemDescription) {
    this.itemDescription = itemDescription;
  }

  public Date getStartActiveDate() {
    return startActiveDate;
  }

  public void setStartActiveDate(Date startActiveDate) {
    this.startActiveDate = startActiveDate;
  }

  public Date getEndActiveDate() {
    return endActiveDate;
  }

  public void setEndActiveDate(Date endActiveDate) {
    this.endActiveDate = endActiveDate;
  }

  public byte getEnabledFlag() {
    return enabledFlag;
  }

  public void setEnabledFlag(byte enabledFlag) {
    this.enabledFlag = enabledFlag;
  }

  public long getObjectVersionNumber() {
    return objectVersionNumber;
  }

  public void setObjectVersionNumber(long objectVersionNumber) {
    this.objectVersionNumber = objectVersionNumber;
  }

  public Date getCreationDate() {
    return creationDate;
  }

  public void setCreationDate(Date creationDate) {
    this.creationDate = creationDate;
  }

  public long getCreatedBy() {
    return createdBy;
  }

  public void setCreatedBy(long createdBy) {
    this.createdBy = createdBy;
  }

  public long getLastUpdatedBy() {
    return lastUpdatedBy;
  }

  public void setLastUpdatedBy(long lastUpdatedBy) {
    this.lastUpdatedBy = lastUpdatedBy;
  }

  public Date getLastUpdateDate() {
    return lastUpdateDate;
  }

  public void setLastUpdateDate(Date lastUpdateDate) {
    this.lastUpdateDate = lastUpdateDate;
  }

  @Override
  public String toString() {
    return "Item{" +
            "itemId=" + itemId +
            ", itemCode='" + itemCode + '\'' +
            ", itemUom='" + itemUom + '\'' +
            ", itemDescription='" + itemDescription + '\'' +
            ", startActiveDate=" + startActiveDate +
            ", endActiveDate=" + endActiveDate +
            ", enabledFlag=" + enabledFlag +
            ", objectVersionNumber=" + objectVersionNumber +
            ", creationDate=" + creationDate +
            ", createdBy=" + createdBy +
            ", lastUpdatedBy=" + lastUpdatedBy +
            ", lastUpdateDate=" + lastUpdateDate +
            '}';
  }
}
